package com.example.boot.modules.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.boot.modules.system.entity.Authority;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @author 王令
 * @since 2022-08-05
 */
public interface AuthorityMapper extends BaseMapper<Authority> {

    List<Authority> listPermissionByRolesId(@Param("rolesId") List<Long> rolesId, @Param("tenantId") String tenantId);

    List<Authority> listPermissionByRolesIdWithMaster(@Param("rolesId") List<Long> rolesId);

    List<Authority> listMenuByRolesId(@Param("rolesId") List<Long> rolesId, @Param("tenantId") String tenantId);

    List<Authority> listMenuByRolesIdWithMaster(@Param("rolesId") List<Long> rolesId);

    List<Authority> listAllAuthority(@Param("tenantId") String tenantId);

    List<Authority> listAllByMaster();
}
